//
//  UserListInteractor.swift
//  demo
//
//  Created by 刘洪宝 on 2025/2/9.
//

import Foundation

class UserListInteractor: UserListInteractorProtocol {
    weak var presenter: UserListInteractorOutputProtocol?
    
    func fetchUsers() {
        // 模拟网络请求
        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
            let users = [
                User(id: 1, name: "张三", email: "zhangsan@example.com"),
                User(id: 2, name: "李四", email: "lisi@example.com"),
                User(id: 3, name: "王五", email: "wangwu@example.com")
            ]
            self.presenter?.usersFetched(users)
        }
    }
} 
